# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kaddressbook
pkgver=20.04.3
pkgrel=0
arch="all !ppc64le !s390x !armhf !mips !mips64" # Limited by qt5-qtwebengine
url="https://kontact.kde.org/components/kaddressbook.html"
pkgdesc="Address Book application to manage your contacts"
license="GPL-2.0-or-later AND LGPL-2.0-or-later"
depends="kdepim-runtime"
makedepends="extra-cmake-modules qt5-qtbase-dev kdepim-apps-libs-dev grantleetheme-dev pimcommon-dev libkleo-dev kdbusaddons-dev kdoctools-dev kcmutils-dev kcrash-dev kpimtextedit-dev akonadi-dev kontactinterface-dev libkdepim-dev gpgme-dev akonadi-search-dev prison-dev kuserfeedback-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kaddressbook-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="3b9d3f17a73c5687a30b10909004aa9c6ed52210808cb147badae4bc07046cac44b0ae2f64e8c950344e755afe3da0f402fb3ed6688d825d99d5e0faf160df5a  kaddressbook-20.04.3.tar.xz"
